#!/user/bin/python
# -*- coding: utf-8 -*-
'''
 @Time    : 2018/5/20 21:06
 @File    : task_entity.py
 @desc    :
'''
from commonSpiders.entity.entity import Entity


class TaskInfoEntity(Entity):

    def __init__(self, task_id, count, start_url, crawler_num, item_list, settings={}, spider=''):
        super(TaskInfoEntity, self).__init__()
        self.task_id = task_id
        self.plan_id = ''

        # 任务设置
        self.settings = settings

        # item配置
        self.item_list = item_list

        # spider配置
        self.crawler_num = crawler_num
        self.spider_key = spider
        self.count = count or 0
        self.start_time = None
        self.end_time = None
        self.allow_urls = ''
        self.deny_urls = ''
        self.start_url = start_url


